<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('宿舍检查记录详情')" />
</head>
<style>
    .tdtextbold{
        font-weight: 500;
    }
    .widthh{
        width: 150px;
    }
    #sushecheckdetail{
        text-align: center;
    }
</style>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m">
        <div class="btn btn-success  dim" style="margin-bottom: 10px;" type="button" id="printbtn"><i class="fa fa-print"></i>&nbsp;打印此表</div><br>
        <table class="table table-bordered" id="sushecheckdetail">
            <tbody>
            <tr><td colspan="9" style="text-align: center;font-size: 20px"><span style="float: left;font-size: 15px;" th:text="${nczxSusheMain.weekname}"></span><span>中学学生宿舍检查记录表&nbsp;</span><span style="float: right;font-size: 15px;" th:text="${nczxSusheMain.weeknum}"></span></td></tr>
            <tr>
                <td class="tdtextbold">序号</td>
                <td class="tdtextbold">年级</td>
                <td class="tdtextbold">班级</td>
                <td class="tdtextbold">宿舍号</td>
                <td class="tdtextbold">床号</td>
                <td class="tdtextbold">性别</td>
                <td class="tdtextbold">扣分标准</td>
                <td class="tdtextbold">扣分原因</td>
                <td class="tdtextbold">检查日期</td>
            </tr>
            <tr th:each="sublist:${nczxSusheMain.nczxSusheSubList}">
                <td th:text="${sublistStat.index+1}"></td>
                <td th:text="${sublist.grade}"></td>
                <td th:text="${sublist.stuclass}"></td>
                <td th:text="${sublist.room}"></td>
                <td th:text="${sublist.bad}"></td>
                <td th:text="${sublist.sex}"></td>
                <td th:text="${sublist.standard}"></td>
                <td th:text="${sublist.standardreason}"></td>
                <td th:text="${#dates.format(sublist.checkdate, 'yyyy-MM-dd')}"></td>
            </tr>
            </tbody>
        </table>
    </form>
</div>
<th:block th:include="include :: footer" />
<script src="../static/ruoyi/js/print.js" th:src="@{/ruoyi/js/print.js}"></script>
<script type="text/javascript">
    document.getElementById('printbtn').onclick = function () {
        Print('#sushecheckdetail', {
            onStart: function () {
                console.log('onStart', new Date())
            },
            onEnd: function () {
                console.log('onEnd', new Date())
            },
            getStyle: function() {
                var str = "",
                    styles = document.querySelectorAll('style,link');
                console.log(styles);
                for (var i = 0; i < styles.length; i++) {
                    str += styles[i].outerHTML;
                }
                return str;
            }
        });
    }
</script>
</body>
</html>
